package com.ship.dispatch.service;

import com.ship.common.core.web.domain.JsonResult;
import com.ship.common.business.service.BaseService;
import com.ship.dispatch.bean.ConResourceMemorandum;
import com.ship.dispatch.bean.SpYearPlanSchemeDetail;
import com.ship.dispatch.bean.SpYearlyPlan;
import com.ship.dispatch.bo.DispatchSellerBo;
import com.ship.dispatch.bo.HistoryDispatchBO;
import com.ship.dispatch.bo.SpYearPlanSchemeDetailBO;
import com.ship.dispatch.model.SpYearlyPlanModel;
import com.ship.dispatch.model.dto.SchemeChartSaveDto;
import com.ship.dispatch.model.dto.SchemeChartSimpleDto;
import com.ship.dispatch.vo.*;
import java.util.List;

/**
 * <p>
 * 年度计划 服务类
 * </p>
 *
 * @author AbyssRabbit@163.com
 * @since 2023-10-17
 */
public interface SpYearlyPlanService extends BaseService<SpYearlyPlan> {

    /**
     * 年度计划方案新增
     * @param spYearlyPlanModel
     * @return
     */
    JsonResult schemeAdd(SpYearlyPlanModel spYearlyPlanModel);

    /**
     * 修改
     *
     * @param detail
     */
    void update(SpYearPlanSchemeDetail detail);

    /**
     * 查询资源合同
     *
     */
    List<ConResourceMemorandum> selectAllContractNumbers(Integer tradeModel);

    /**
     * 查询所有资源方
     *
     */
    List<ConResourceSellerVO> selectAllSellers();

    /**
     * 根据合同编号查出资源方（卖方）
     *
     * @return
     */
    String getContractNumberBySeller(String contractNumber);

    /**
     * 下载图片并保存到本地
     * @param base64Data
     * @param fileName
     */
    void saveBase64Image(String base64Data, String fileName);

    SpYearPlanSchemeDetailBO updateSpYearPlanSchemeDetail(SpYearPlanSchemeDetailBO detail);

    JsonResult<SpYearPlanSchemeDetail> tradingProfitUpdate(SpYearPlanSchemeDetail detail);

    JsonResult schemeChartSave(SchemeChartSaveDto dto);

    JsonResult schemeChartCalculateSave(SchemeChartSaveDto dto);

    JsonResult<SpYearPlanSchemeDetail> getPlanSchemeChart(SchemeChartSimpleDto dto);

    JsonResult<List<SpYearPlanSchemeDetail>> getSchemeHistory(HistoryDispatchBO historyDispatchBO);

    List<ConResourceSellerVO> selectAllSellersByScheme(DispatchSellerBo sellerBo);
}
